package com.xyyhome.web.love.domain;

import javax.persistence.*;

/**
 * Created by ty850 on 2017/5/21.
 */
@Entity
@Table(name = "y_l_pandect_person", schema = "xyyhome", catalog = "")
public class YLPandectPerson {
    private String ylppId;
    private String ylppPandectId;
    private Byte ylppState;
    private Integer ylppLoveValue;

    @Id
    @Column(name = "ylpp_id", nullable = false, length = 36)
    public String getYlppId() {
        return ylppId;
    }

    public void setYlppId(String ylppId) {
        this.ylppId = ylppId;
    }

    @Basic
    @Column(name = "ylpp_pandect_id", nullable = true, length = 36)
    public String getYlppPandectId() {
        return ylppPandectId;
    }

    public void setYlppPandectId(String ylppPandectId) {
        this.ylppPandectId = ylppPandectId;
    }

    @Basic
    @Column(name = "ylpp_state", nullable = true)
    public Byte getYlppState() {
        return ylppState;
    }

    public void setYlppState(Byte ylppState) {
        this.ylppState = ylppState;
    }

    @Basic
    @Column(name = "ylpp_love_value", nullable = true)
    public Integer getYlppLoveValue() {
        return ylppLoveValue;
    }

    public void setYlppLoveValue(Integer ylppLoveValue) {
        this.ylppLoveValue = ylppLoveValue;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        YLPandectPerson that = (YLPandectPerson) o;

        if (ylppId != null ? !ylppId.equals(that.ylppId) : that.ylppId != null) return false;
        if (ylppPandectId != null ? !ylppPandectId.equals(that.ylppPandectId) : that.ylppPandectId != null)
            return false;
        if (ylppState != null ? !ylppState.equals(that.ylppState) : that.ylppState != null) return false;
        if (ylppLoveValue != null ? !ylppLoveValue.equals(that.ylppLoveValue) : that.ylppLoveValue != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = ylppId != null ? ylppId.hashCode() : 0;
        result = 31 * result + (ylppPandectId != null ? ylppPandectId.hashCode() : 0);
        result = 31 * result + (ylppState != null ? ylppState.hashCode() : 0);
        result = 31 * result + (ylppLoveValue != null ? ylppLoveValue.hashCode() : 0);
        return result;
    }
}
